<?php
  header('Content-Type:text/html;charset=utf-8');
  require_once 'class.php';
  PDOc::_connect();
  $id=$_POST['id'];
  $authorID=$_POST['authorID'];
  $mainText=$_POST['mainText'];
  $title=$_POST['title'];
  $authorName=$_POST['authorName'];
  $authorAdminRank=$_POST['authorAdminRank'];
  PDOc::deletePassage($id);
  $createDate=date("Y-m-d H:i:s",time());
  PDOc::newPassage($authorID,$authorAdminRank,$authorName,$title,$mainText,$createDate);
?>